
#ifndef GKT_CRC32_H
#define GKT_CRC32_H

#include "gkt_types.h"

uint32_t crc32_calc_in_reverse_true(uint32_t poly, 
					uint32_t crc_init, 
					const uint8_t *data, uint32_t length);

uint32_t crc32_calc_in_reverse_false(uint32_t poly, 
					uint32_t crc_init, 
					const uint8_t *data, uint32_t length);

#define GKT_CRC32_POLY	0x04C11DB7
#define GKT_CRC32_INIT	0xFFFFFFFF
#define GKT_CRC32_OUT_XOR	0xFFFFFFFF
uint32_t gkt_crc32(const uint8_t *data, uint32_t length);

#define GKT_CRC32_MPEG2_POLY	0x04C11DB7
#define GKT_CRC32_MPEG2_INIT	0xFFFFFFFF
#define GKT_CRC32_MPEG2_OUT_XOR	0x00000000
uint32_t gkt_crc32_mpeg2(const uint8_t *data, uint32_t length);

#endif	/* GKT_CRC32_H */


